package com.example.foodsy.service.impl;

import com.example.foodsy.entity.Province;
import com.example.foodsy.mapper.ProvinceMapper;
import com.example.foodsy.service.ProvinceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 省行政区域信息表 服务实现类
 * </p>
 *
 * @author cgc
 * @since 2025-09-23
 */
@Service
public class ProvinceServiceImpl extends ServiceImpl<ProvinceMapper, Province> implements ProvinceService {

    @Autowired
    private ProvinceMapper provinceMapper;
    // 查询所有省
    @Override
    public List<Province> listAll() {
        // MyBatis-Plus查询所有（无条件）
        return provinceMapper.selectList(null);
    }
}
